;;;Identifies 3D-Lines and the layer they are on and adds the Lines to a selection set.
;;;
;;;	Author:
;;;		Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;
;;;	All rights reserved.
;;;
;;;	Copyright:  11/28/2003
;;;	   Edited:  07/21/2012
(defun c:3dline ()
  (setq nentdef (entget(entnext)))
  (if (eq (cdr(assoc 0 nentdef)) "LINE")
    (pr3dline nentdef)
  )
  (setq 3dl-ss (ssadd))
  (while
    (setq nent (entnext (cdr(assoc -1 nentdef))))
    (setq nentdef (entget nent))
    (if (eq (cdr(assoc 0 nentdef)) "LINE")
      (pr3dline nentdef)
    )
  )
  (princ "\nDone checking for 3D lines. ")
  (princ)
)
(defun pr3dline (x / )
  (if (not(equal (cdddr (assoc 10 x))(cdddr (assoc 11 x))))
    (progn
      (ssadd nent 3dl-ss)
      (princ "\nLINE on layer ")
      (princ (strcase(cdr(assoc 8 x))))
      (princ " has unequal Z coordinates")
      (princ)
    )
  )
  (princ)
)